//
//  LoginViewController.swift
//  Retail
//
//  Created by zhangjikuan on 2020/6/30.
//  Copyright © 2020 aqdeal. All rights reserved.
//

import UIKit

class LoginViewController: BaseViewController {
    

    override func viewDidLoad() {
        super.viewDidLoad()
        print("login app")

        let loginBtn = UIButton(type: .custom)
        loginBtn.frame = CGRect(x: 15, y: 120, width: 100, height: 45)
        loginBtn.setTitle("登录", for: .normal)
        loginBtn.addTarget(self, action: #selector(loginClick), for: .touchUpInside)
        loginBtn.backgroundColor = UIColor.red
        loginBtn.setTitleColor(UIColor.black, for: .normal)
        view.addSubview(loginBtn)
        
        var str = "iOS"
        
        print(MemoryLayout.size(ofValue: str))
        
        /// 占有多少个字节
        print(MemoryLayout.stride(ofValue: str))

        
    }
    @objc
    func loginClick() {
        print("login Click")
//        dismiss(animated: true, completion: nil)
        let baseTab = BaseTabBarController()
        
        RetailToolChangeRootController.execute(baseTab)

        /// mvc mvvm  s i o d l
        
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
